<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="java.sql.*"%> 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Place your description here">
<meta name="keywords" content="put, your, keyword, here">
<meta name="author" content="Templates.com - website templates provider">
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
<link rel="stylesheet" href="css/layout.css" type="text/css" media="all">
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<link rel="stylesheet" href="css/buttonCSS.css" type="text/css" media="all">
<link href="css/calendar.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/help.css" type="text/css" media="all">        
<script type="text/javascript" src="js/jquery.pageslide.min.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-replace.js"></script>
<script language="javaScript" type="text/javascript" src="js/calendar.js"></script>
<script type="text/javascript" src="js/maxheight.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js" ></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-replace.js"></script>
<script type="text/javascript" src="js/Myriad_Pro_400.font.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=600,height=1000,scrollbars=yes');
return false;
}
 

//-->
</SCRIPT>
<!--[if lt IE 7]>
	<link rel="stylesheet" href="css/ie/ie6.css" type="text/css" media="screen">
	<script type="text/javascript" src="js/ie_png.js"></script>
	<script type="text/javascript">
		ie_png.fix('.png, #slogan, header nav ul li a, .icon img, .link1, .link1 span');
	</script>
<![endif]-->
<!--[if lt IE 9]>
	<script type="text/javascript" src="js/html5.js"></script>
<![endif]-->
</head>
<jsp:useBean id="Controller" class="controller.Controller" scope="session" />
<body id="page1" onLoad="new ElementMaxHeight();">
<a href="javascript:$.pageslide({ direction: 'right', href: 'help/Test.html' })" class="first">Help</a>
<div class="wrap">
<!-- header -->
 <%@ include file="headers.jsp" %>
                   <%
        //check if a user has logged in. If not redirect to home page
       String currentUser = (String) session.getAttribute("user");        
        if(currentUser == null){            
           String redirectURL = "index.jsp";
          response.sendRedirect(redirectURL);
     }
       %>		
<!-- content -->

                      <%
String mtestresultid = " ";
String mtest_result_requestid = " ";
String mtesttakendate= " ";
String mresultdate = " ";
String mresult = " ";
String mresultfilepath = " ";
String mstafftobeinformed = " ";
String mdatetoinformstaff= " ";
String motherstobeinformed = " ";
String mdatetoinformothers =  " ";
String mcomments = " ";
String muserid = " ";
String test_resultid1="";
Connection conne = null;
//String test_requestid = (String)session.getAttribute("test_requestid");

try
{
	Class.forName("com.mysql.jdbc.Driver");
	conne = DriverManager.getConnection(Controller.getDBManager().getDBAccess().getConStr(), Controller.getDBManager().getDBAccess().getUserName(), Controller.getDBManager().getDBAccess().getPwd());
    Statement st=conne.createStatement();
    ResultSet res = null;
    test_resultid1=request.getParameter("test_resultid");
    int test_resultid=Integer.parseInt(test_resultid1);
    res= st.executeQuery("select * from test_result_record"+ " where testresultid="+test_resultid);
    
if(res.next())
{
	mtestresultid = res.getString(1);
	mtest_result_requestid = res.getString(2);
	mtesttakendate = res.getString(3);
	mresultdate = res.getString(4);
	mresult = res.getString(5);
	mresultfilepath = res.getString(6);
	mstafftobeinformed = res.getString(7);
	mdatetoinformstaff = res.getString(8);
	motherstobeinformed = res.getString(9);
        mdatetoinformothers=res.getString(10);
	//mremindernote = res.getString(10);
	//mreminderdate = res.getString(11);
	mcomments = res.getString(11);
	muserid = res.getString(12);
}
   res.close();
   st.close();
}
catch(Exception e){
    System.out.print(e);
    e.printStackTrace();
    }
finally{
    if(null!= conne)
               {
        conne.close();
       }
    }
	
%>
<section id="content">
    <div class="inside">
        <div class="container">
                        <div class="wrapper indent">
                          <article class="col-0"> 

  <table><tr><td>
            <h2> Information On Test Result </h2> </td></tr>    &nbsp; &nbsp;&nbsp;        <br/> <br/>       
 <table>

<tr>
          <td width = "200"> <h3>Test Taken Date      </h3></td>
          <td><p>
                  <input readonly="readonly" name="mtesttakendate" type="text" class ="textbox" value ="<%=mtesttakendate%>" size="20">
          </p>
           <p>&nbsp; </p></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width = "200"> <h3>Result Date   </h3></td>
          <td><p>
             <input readonly="readonly" name="mresultdate" type="text" class ="textbox" value ="<%=mresultdate%>" size="20">
          </p>
           <p>&nbsp; </p></td>
          <tr></tr>
<tr>
          <td width = "200"> <h3>Result File Path    </h3></td>
          <td><p>
             <input readonly="readonly" name="mresult" type="text" class ="textbox" value ="<%=mresult%>" size="20">
          </p>
           <p>&nbsp; </p></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>          <td width = "200"> <h3>Result File Path      </h3></td>
          <td><p>
             <input readonly="readonly" name="mresultfilepath" type="text" class ="textbox" value ="<%=mresultfilepath%>" size="20">
          </p>
           <p>&nbsp; </p></td>
          <tr></tr>
<tr>
          <td width = "200"> <h3>Staff to be Informed    </h3></td>
          <td><p>
                    <select disabled="true" name="stafftobeinformed" size=4 multiple>
              <%
              String[] split = mstafftobeinformed.split(";");
              for(int i=0;i<split.length;i++)
                                   {
    %>
                  <option><%=split[i]%></option>
              <%}%>
          </select>
          </p>
           <p>&nbsp; </p></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width = "200"> <h3>Date to Inform Staff     </h3></td>
          <td><p>
             <input readonly="readonly" name="mdatetoinformstaff" type="text" class ="textbox" value ="<%=mdatetoinformstaff%>" size="20">
          </p>
           <p>&nbsp; </p></td>
          <tr></tr>
<tr>
          <td width = "200"> <h3>  Others to be Informed   </h3></td>
          <td><p>
             <input readonly="readonly" name="motherstobeinformed" type="text" class ="textbox" value ="<%=motherstobeinformed%>" size="20">
          </p>
           <p>&nbsp; </p></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width = "200"> <h3>Date to Inform Others     </h3></td>
          <td><p>
             <input readonly="readonly" name="mdatetoinformothers" type="text" class ="textbox" value ="<%=mdatetoinformothers%>" size="20">
          </p>
           <p>&nbsp; </p></td>
          <tr></tr>
<tr>
    <td width = "200"> <h3>Comments      </h3></td>
          <td><p>
             <input readonly="readonly" name="mcomments" type="text" class ="textbox" value ="<%=mcomments%>" size="20">
          </p>
           <p>&nbsp; </p></td>
       <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> 
       
          <td width = "200"> <h3>User Name     </h3></td>
          <td><p>
             <input readonly="readonly" name="muserid" type="text" class ="textbox" value ="<%=(String) session.getAttribute("user")%>" size="20">
          </p>
          </td>
          <tr></tr>
	
	</table>
        <input type="button" class="blue button"  onClick="window.location='/TSRH/testresult.jsp?test_requestid=<%=mtest_result_requestid%>'" value="OK">
          
          

        </div>
        </div>
   
        <br>
        <br>
        
<%@ include file="footers.jsp" %>

<script type="text/javascript">Cufon.now();</script>
<script src="js/jquery.pageslide.min.js"></script>
</body>
</html>
